package com.msh.platform.elm.entity;

import javax.persistence.*;

import io.swagger.annotations.ApiModelProperty;

import java.util.Objects;

@Entity
@Table(name = "wx_pub_no", schema = "mscm_dev", catalog = "")
public class WxPubNo {
    private int id;
    @ApiModelProperty(value="所属商会id")
    private int sellerId;
    @ApiModelProperty(value="公众号名称")
    private String name;
	@ApiModelProperty(value="头像地址")
    private String avatar;
	@ApiModelProperty(value="详细介绍")
    private String detail;
	@ApiModelProperty(value="微信号")
    private String acctNo;
	@ApiModelProperty(value="粉丝数")
    private Integer fansCnt;
	@ApiModelProperty(value="二维码图片地址")
    private String qrCodeUrl;
	@ApiModelProperty(value="公众号类型")
    private String type;
	@ApiModelProperty(value="是否删除")
    private String delFlag;
	@ApiModelProperty(value="状态")
    private String status;
	@ApiModelProperty(value="创建时间")
    private int createTime;
	@ApiModelProperty(value="状态时间")
    private int stateTime;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "seller_id")
    public int getSellerId() {
        return sellerId;
    }

    public void setSellerId(int sellerId) {
        this.sellerId = sellerId;
    }

    @Basic
    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "avatar")
    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    @Basic
    @Column(name = "detail")
    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    @Basic
    @Column(name = "FANS_cnt")
    public Integer getFansCnt() {
        return fansCnt;
    }

    public void setFansCnt(Integer fansCnt) {
        this.fansCnt = fansCnt;
    }

    @Basic
    @Column(name = "acct_no")
    public String getAcctNo() {
        return acctNo;
    }

    public void setAcctNo(String acctNo) {
        this.acctNo = acctNo;
    }

    @Basic
    @Column(name = "QR_CODE_url")
    public String getQrCodeUrl() {
        return qrCodeUrl;
    }

    public void setQrCodeUrl(String qrCodeUrl) {
        this.qrCodeUrl = qrCodeUrl;
    }

    @Basic
    @Column(name = "TYPE")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    @Basic
    @Column(name = "DEL_FLAG")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public int getCreateTime() {
        return createTime;
    }

    public void setCreateTime(int createTime) {
        this.createTime = createTime;
    }
    
    @Basic
    @Column(name = "STATE_TIME")
    public int getStateTime() {
        return stateTime;
    }

    public void setStateTime(int stateTime) {
        this.stateTime = stateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WxPubNo wxPubNo = (WxPubNo) o;
        return id == wxPubNo.id &&
                sellerId == wxPubNo.sellerId &&
                createTime == wxPubNo.createTime &&
        		stateTime == wxPubNo.stateTime &&
                Objects.equals(name, wxPubNo.name) &&
                Objects.equals(avatar, wxPubNo.avatar) &&
                Objects.equals(detail, wxPubNo.detail) &&
                Objects.equals(fansCnt, wxPubNo.fansCnt) &&
                Objects.equals(acctNo, wxPubNo.acctNo) &&
                Objects.equals(qrCodeUrl, wxPubNo.qrCodeUrl) &&
                Objects.equals(type, wxPubNo.type) &&
                Objects.equals(delFlag, wxPubNo.delFlag) &&
                Objects.equals(status, wxPubNo.status);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, sellerId, name, avatar, detail, fansCnt, acctNo, qrCodeUrl, type, delFlag, status, createTime, stateTime);
    }
}
